<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>documentName</title>
    <link rel="stylesheet" href="" />
  </head>
  <body>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
    <script>
      /**
       * @操作
       * 1、浏览器运行文件；
       * 2、打开控制台；
       * 3、按下任意按键会触发 keyup 事件；
       */
      $(function () {
        $(document).keyup(function () {
          console.log('键盘按键按下时')
        })
      })
    </script>
  </body>
</html>
